require(['./config'],()=>{
    require(['template','header','footer'],(template)=>{
        class index{
            constructor(){
                console.log(template);
                this.getClassification();
                this.getShopping();
            }
            getClassification(){
                $.get('http://rap2api.taobao.org/app/mock/234038/seller',res => {
                    if(res.code === 200){
                        //  console.log(res);
                        //  console.log($('#list_shop'));
                         const {list} = res.body;
                        //  console.log(list)
                        // console.log(template('listShopTemplate',{seller:seller}))
                         $('#list_shop').html(template('listShopTemplate',{list1:list}));
                    }
                })
            };
            getShopping(){
                $.get('http://rap2api.taobao.org/app/mock/234038/dcs',res => {
                    // console.log(res);
                    if(res.code === 200){
                        const {list} = res.body;
                        // console.log( $('.shopping_choice02'));
                        $('.shopping_choice02').html(template('choice02Template',{list}));
                    }
                   

                })

            }
        }
        new index();
    })
})